package com.wanxi.education.mapper;

import com.wanxi.education.model.pojo.Order;
import com.wanxi.education.model.vo.order.*;
import io.lettuce.core.dynamic.annotation.Param;
import org.springframework.stereotype.Component;

import java.math.BigDecimal;
import java.util.List;

/**
 * @Author: 寇文宝
 * @Description:
 * @Date: Created in 2021/9/24
 * @Version: 1.0
 */
@Component
public interface OrderFrontMapper {
//    Order findOrderMessage(OrderAddVo orderAddVo);

    void generateOrder(Order order);

    String findAgencyName(Long id);

    Integer findStudyLengthByCourseId(Long courseId);

    List<OrderGoFrontVo> findPage(Long userId);

    OrderFindByIdVo findById(@Param("id") Long id,@Param("userId") Long userId);

    String findCertificateName(Long id);

    void cancel(@Param("id") Long id,@Param("userId") Long userId);

    void payMoney(@Param("outTradeNo") String outTradeNo,@Param("transactionId") String transactionId);

    Integer searchOrderState(@Param("orderNumber") String orderNumber,@Param("userId") Long userId);

    CcieIdAndUserIdVo findCcieIdAndUserId(String outTradeNo);

    void bindCcieAndUser(@Param("userId") Long userId,@Param("ccieId") Long ccieId);

    void autoCancelOrder(Long id);

    BigDecimal findPrice(Long courseId);

    Long findAgencyId(Long userId);

    void payFailed(String outTradeNo);

    Integer findOrderState(Long id);

    void updateCourseSale(@Param("outTradeNo") String outTradeNo,@Param("num") Integer num);

    String findCourseName(Long courseId);

    Integer findOrder(String outTradeNo);
}
